<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>添加学生信息</title>
</head>
<script type="text/javascript" src="jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
	$(function(){
		var bt=$("#but").val("添加用户");
		bt.click(function(){
			var name=$("#username").val();
			var pass=$("#pass").val();
			var age=$("#age").val();
			var adress=$("#adress").val();
			$.ajax({url:"login",
					type:"post",
					data:{"username":name,"userpass":pass,"userage":age,"useraddress":adress},
					success:function(data){
						alert(data);
					}});
		})
	})
</script>
<body>
用户名:<input type="text" id="username" /><br/>
密  码:<input type="password" id="pass" /><br/>
年  龄:<input type="text" id="age" /><br/>
住  址:<input type="text" id="adress" /><br/>
<input type="button" id="but" />
</body>
</html>